#include <iostream>
#include <vector>

using namespace std;

void insert_sort(int a[], int n);

int main()
{
    int a[100];
    int k;
    cin >> k;
    for(int i = 0; i < k; ++i) cin >> a[i];
    insert_sort(a, k);
    for(int i = 0; i < k; ++i) cout << a[i] << ' ';
}

void insert_sort(int a[], int n)
{
    for(int j = 1; j < n; ++j)
    {
        int k = a[j];
        int i = j - 1;
        while (k < a[i] && i >= 0)
        {
            a[i+1] = a[i];
            --i;
        }
        a[i+1] = k;
    }
}

